package com.sshop.core.service.user;

import cn.itcast.common.page.Pagination;
import com.sshop.core.bean.user.Buyer;
import com.sshop.core.query.user.BuyerQuery;

import java.util.List;

/**
 * @author ljm
 * @Date [2017-3-28 下午01:50:28]
 */
public interface BuyerService {
    /**
     * 基本插入
     *
     * @return
     */
    public Integer addBuyer(Buyer buyer);

    /**
     * 根据主键查询
     */
    public Buyer getBuyerByKey(String id);

    /**
     * 根据主键批量查询
     */
    public List<Buyer> getBuyersByKeys(List<String> idList);

    /**
     * 根据主键删除
     *
     * @return
     */
    public Integer deleteByKey(String id);

    /**
     * 根据主键批量删除
     *
     * @return
     */
    public Integer deleteByKeys(List<String> idList);

    /**
     * 根据主键更新
     *
     * @return
     */
    public Integer updateBuyerByKey(Buyer buyer);

    /**
     * 根据条件查询分页查询
     *
     * @param buyerQuery 查询条件
     * @return
     */
    public Pagination getBuyerListWithPage(BuyerQuery buyerQuery);

    /**
     * 根据条件查询
     *
     * @param buyerQuery 查询条件
     * @return
     */
    public List<Buyer> getBuyerList(BuyerQuery buyerQuery);
}
